# -*- coding: utf-8 -*-

from orator import DatabaseManager
from app.base.tables import tb
from app.config.configs import configs

db = DatabaseManager(configs['orator'])

rs = db.select('select * from ' + tb['common_zone'] + ' where level = ?', [1])

# rs = db.table(tb['common_zone']).select('id', 'short_name').where('pid', '=', 410000).where('short_name', 'like', '%阳%').get()
# for r in rs:
#     print(r)

# rs = db.table(tb['common_zone']).where('level', 1).lists('id', 'short_name')
# print(rs)
